export default {
    dateFmt: time => {
        //若为时间戳，转为时间对象
        let date;
        if (typeof time === "object") {
            date = time;
        } else {
            if (("" + time).length === 10) time = parseInt(time) * 1000;
            date = new Date(time);
        }
        return `${String(date.getFullYear()).substring(String(date.getFullYear()).length-2)}/${date.getMonth() + 1}/${date.getDate()}`
    }
}